<?php
include_once ($_SERVER['DOCUMENT_ROOT'].'/global.php');
$array = array();
if($_GET['leibie'] == '2'){
  $leibie_sql = " where leibie = 1 ";
}else{
  $leibie_sql = "where 1";
}
$sql="
Select id,name from QiKan {$leibie_sql}";
$query = $mysqli->query($sql);
while ($a = $query->fetch_assoc()) {
  $array[] = $a;
}
echo json_encode($array);
exit;
?>
